import httpInstance from '@/utils/http';

export function getCategoryListAPI() {
  return httpInstance({
    url: '/home/category/head',
  });
}

//获取轮播图数据              @/apis/home.js
export function getBannerListAPI(params: Object = {}) {
  // 默认为1 商品为2
  const { distributionSite = '1' } = params;
  return httpInstance({
    url: '/home/banner',
    params: {
      distributionSite,
    },
  });
}

export function getNewGoodsListAPI() {
  return httpInstance({
    url: '/home/new',
  });
}

export function getHotGoodsListAPI() {
  return httpInstance({
    url: '/home/hot',
  });
}

/**
 *获取商品模块Product
 */
export const getGoodsAPI = () => {
  return httpInstance({
    url: '/home/goods',
  });
};
